<?php

abstract class CoreInstance
{

    private static ?CoreInstance $instance = null;

    final public static function getInstance(): static|null
    {
        if (!self::$instance instanceof static) {
            self::$instance = new static;
        }
        return self::$instance;
    }

}